package com.amazon.ags.client.whispersync;

import java.io.File;
import java.io.FilenameFilter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public final class SafeFilenameFilterWrapper
  implements FilenameFilter
{
  private static final Set<String> FORBIDDEN_DIRECTORIES = new HashSet(Arrays.asList(new String[] { "cache", "lib", ".amazonGamesService" }));
  private FilenameFilter gameFilter = null;

  public boolean accept(File paramFile, String paramString)
  {
    if ((new File(paramFile, paramString).isDirectory()) && (FORBIDDEN_DIRECTORIES.contains(paramString)))
      return false;
    if (this.gameFilter == null)
      return true;
    return this.gameFilter.accept(paramFile, paramString);
  }

  public void setFilter(FilenameFilter paramFilenameFilter)
  {
    this.gameFilter = paramFilenameFilter;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.amazon.ags.client.whispersync.SafeFilenameFilterWrapper
 * JD-Core Version:    0.6.2
 */